<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #main {
      display: inline-block;
      padding: .5em;
      border: .5em solid transparent;
      border-radius: .3em;
      background: linear-gradient(white, white) padding-box,
                  repeating-linear-gradient(-45deg, red 0 12.5%, transparent 0 25%, #58a 0 37.5%, transparent 0 50%) 0 / 2.5em 2.5em;
    }
  </style>
</head>
<body>
  <div id="main">信封边框效果</div>
</body>
</html>